#! /bin/bash


post_install () {
	rm --force \
		"etc/X11/xorg.conf" \
		"etc/X11/xorg.conf.backup" \
		"etc/X11/xorg.conf.nvidia-xconfig-original" \
		"etc/X11/nvidia-xorg.conf.d/"*nvidia*

	systemctl enable "optimus-manager.service"
}


post_upgrade () {
	systemctl daemon-reload
}


pre_remove() {
	systemctl disable --now "optimus-manager.service"
	rm --force "etc/X11/xorg.conf.d/10-optimus-manager.conf"
}
